<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>评论图片列表</title>
    <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1.0" />
    <#include "/view/admin/head.html"/>
    <script type="text/javascript" src="${base}/jstool/bootstrap-datetimepicker/js/bootstrap-datetimepicker.js"></script>
    <script type="text/javascript" src="${base}/jstool/bootstrap-datetimepicker/js/locales/bootstrap-datetimepicker.zh-CN.js"></script>
    <link rel="stylesheet" type="text/css" href="${base}/jstool/bootstrap-datetimepicker/css/bootstrap-datetimepicker.min.css" />
    <script type="text/javascript" src="${base}/jstool/bootstrap-datetimepicker/js/bootstrap-datetimepicker.js"></script>
    <script type="text/javascript" src="${base}/jstool/bootstrap-datetimepicker/js/locales/bootstrap-datetimepicker.zh-CN.js"></script>
    <link rel="stylesheet" type="text/css" href="${base}/jstool/bootstrap-datetimepicker/css/bootstrap-datetimepicker.min.css" />
    <script type="text/javascript" src="${base}/jstool/bootstrap-select/js/bootstrap-select.min.js"></script>
    <script type="text/javascript" src="${base}/jstool/bootstrap-select/lang/defaults-zh_CN.min.js"></script>
    <link rel="stylesheet" type="text/css" href="${base}/jstool/bootstrap-select/css/bootstrap-select.min.css" />

    <style type="text/css">
        .table-class{
            width:90%;
            text-align: center;
            border:1px solid #afd9ee;
            margin:0 auto;
            margin-top: 50px;
        }
        .list-path{
            height: 50px;
            line-height: 50px;
            background-color: #9acfea;

        }
        table th{
            text-align: center;
            WORD-WRAP: break-word;
            width: 100px;
        }
        table thead tr {
            background-color: #9acfea;
        }
        .table-query{
            /*height: 40px;*/
            /*width:80px;*/
            /*text-align: center;*/
            white-space:nowrap;
            /*position: relative;*/
            float: left;
            display:inherit;
            /*display: inline;*/


        }
        .label-head{
            height: 60px;
            width: 100%;
        }
        .bs-example .input-group{
            width:300px;
            float: left;
            margin-top:20px;

        }
        .bank-label{
            width:25px;
            float: left;
        }
        .label-hidden{
            display: none;
        }
        .panel-body{
            padding-top: 0px;
        }
        .input-group input[type='text']{
            z-index: inherit;
        }
       /* .input-group{
            margin-top:20px;
        }*/
    </style>
    <script type="text/javascript">
        function query(dm){
            var href = "${base}/czjcommentspic/list.do?";


            href+='approveStatus='+$('#approveStatus').val();
                    href+='&'

            href+='approveTimeStart='+$('#approveTimeStart').val()+"&";
            href+='approveTimeEnd='+$('#approveTimeEnd').val();
                    href+='&'

            href+='commentsId='+$('#commentsId').val();
                    href+='&'

            href+='createTimeStart='+$('#createTimeStart').val()+"&";
            href+='createTimeEnd='+$('#createTimeEnd').val();
                    href+='&'


            location.href=href;
        }
        $(function() {
            //初始化
                $('#approveTimeStart').datetimepicker({language: 'zh-CN' });
                $('#approveTimeEnd').datetimepicker({language: 'zh-CN' });
                $('#createTimeStart').datetimepicker({language: 'zh-CN' });
                $('#createTimeEnd').datetimepicker({language: 'zh-CN' });
        });
    </script>
</head>
<body>

<#include "/view/admin/listnav.html"/>

<div class="table-class">
    <div class="panel panel-default" style="margin: 10px 50px 10px;">
     <div class="panel-body">
        <form class="bs-example bs-example-form" role="form">


            <div class="input-group">
                <span class="input-group-addon">审批状态</span>
                <select id="approveStatus" name="approveStatus"
                        class="form-control"
                >
                    <option value="">请选择审批状态</option>
                                <option value="0" <#if entity.approveStatus??&&0 == entity.approveStatus>selected="selected"</#if>>审批中</option>

                                <option value="1" <#if entity.approveStatus??&&1 == entity.approveStatus>selected="selected"</#if>>审批通过</option>

                                <option value="2" <#if entity.approveStatus??&&2 == entity.approveStatus>selected="selected"</#if>>审批不通过</option>


                </select>

            </div>
                <span class="bank-label">&nbsp;</span>


                <div class="input-group">
                    <span class="input-group-addon">开始审批时间</span>
                    <input type="text" id="approveTimeStart" class="form-control" value="<#if (entity.approveTimeStart)?? >${entity.approveTimeStart?string('yyyy-MM-dd HH:mm:ss')}</#if>" id="approveTimeStart" name="approveTimeStart" data-date-format="yyyy-mm-dd hh:ii:ss">
                </div>
                <span class="bank-label">&nbsp;</span>
                <div class="input-group">
                    <span class="input-group-addon">结束审批时间</span>
                    <input type="text" id="approveTimeEnd" class="form-control" value="<#if (entity.approveTimeEnd)?? >${entity.approveTimeEnd?string('yyyy-MM-dd HH:mm:ss')}</#if>" id="approveTimeEnd" name="approveTimeEnd" data-date-format="yyyy-mm-dd hh:ii:ss">
                </div>
                <span class="bank-label">&nbsp;</span>

            <div class="input-group">
                <span class="input-group-addon">评论</span>
                <select id="commentsId" name="commentsId"
                        class="form-control selectpicker"   data-live-search="true"
                >
                    <option value="">请选择评论</option>
                            <#list listCommentsId as lv>
                                <option value="${lv.value!}"
                                <#if entity.commentsId??&&entity.commentsId == lv.value >
                                    selected="selected"
                                </#if>
                                >${lv.name!}</option>
                            </#list>




                </select>

            </div>
                <span class="bank-label">&nbsp;</span>


                <div class="input-group">
                    <span class="input-group-addon">开始创建时间</span>
                    <input type="text" id="createTimeStart" class="form-control" value="<#if (entity.createTimeStart)?? >${entity.createTimeStart?string('yyyy-MM-dd HH:mm:ss')}</#if>" id="createTimeStart" name="createTimeStart" data-date-format="yyyy-mm-dd hh:ii:ss">
                </div>
                <span class="bank-label">&nbsp;</span>
                <div class="input-group">
                    <span class="input-group-addon">结束创建时间</span>
                    <input type="text" id="createTimeEnd" class="form-control" value="<#if (entity.createTimeEnd)?? >${entity.createTimeEnd?string('yyyy-MM-dd HH:mm:ss')}</#if>" id="createTimeEnd" name="createTimeEnd" data-date-format="yyyy-mm-dd hh:ii:ss">
                </div>
                <span class="bank-label">&nbsp;</span>



            <div class="input-group" style="text-align: right;">
                <a class="btn btn-info"  href="javascript:query(this)"><span class="glyphicon glyphicon-search"></span> 查找</a>

            </div>
        </form>
     </div>
    </div>

<#include "/view/admin/opermsg.html"/>


    <table class="table table-hover table-bordered">
        <thead>
        <tr>
            <th>序号</th>
                <th class="label-hidden">评论图片</th>
                <th>评论图片</th>
                <th>审批状态</th>
                <th>审批时间</th>
                <th>评论</th>
                <th>创建时间</th>
                <th class="label-hidden">删除标识</th>

            <th>操作</th>
        </tr>
        </thead>
        <tbody>
        <#list pagination.list as c>
            <tr>
                <td>${(pagination.pageNo-1)*pagination.pageSize+1+c_index}</td>
                        <td class="label-hidden">${c.commentPicId!}</td>
                        <td><img src="${base}${c.picPath!}" height="50px"></td>
                        <td> 
                            <#if c.approveStatus??>
                                        <#if 0==c.approveStatus><span class="label label-default">审批中</span>

                                        <#elseif   1==c.approveStatus><span class="label label-success">审批通过</span>

                                        <#elseif 2==c.approveStatus><span class="label label-danger">审批不通过</span>

                                    </#if>

                            </#if>

                        </td>
                        <td><#if c.approveTime?? >${c.approveTime?string('yyyy-MM-dd HH:mm:ss')}</#if></td>
                        <td> 

                            <#if c.commentsId??>
                                    <#list listCommentsId as lv>
                                        <#if lv.value??&&c.commentsId == lv.value >
                                        ${lv.name!}
                                        </#if>
                                    </#list>

                            </#if>
                        </td>
                        <td><#if c.createTime?? >${c.createTime?string('yyyy-MM-dd HH:mm:ss')}</#if></td>
                        <td class="label-hidden">${c.delFlag!}</td>

                <td>
                    <a href="${base}/czjcommentspic/detail.do?commentPicId=${c.commentPicId!}" class="btn btn-primary">详情</a>
                    <a href="${base}/czjcommentspic/add.do?commentPicId=${c.commentPicId!}" class="btn btn-primary">修改</a>
                </td>
            </tr>


        </#list>
        <#if 0==pagination.totalCount>
            <tr>
                <td colspan="7" style="color: red"> 没有相关数据 </td>
            </tr>
        </#if>





        </tbody>
    </table>
        <!--<span style="text-align: left"> <a href="#" class="btn btn-primary">新增</a></span>-->
    <#include "/view/admin/pagination.html"/>


</div>
<script>
    function setPage(pageNo,pageSize){
        var href = "${base}/czjcommentspic/list.do?";



            href+='approveTimeStart='+$('#approveTimeStart').val()+"&";
            href+='approveTimeEnd='+$('#approveTimeEnd').val()+"&";


            href+='createTimeStart='+$('#createTimeStart').val()+"&";
            href+='createTimeEnd='+$('#createTimeEnd').val()+"&";


        href+="&pageNo="+pageNo;
        href+="&pageSize="+pageSize;
        location.href=href;
    }

</script>

</body>
</html>
